<?php

@include_once("connect.php");

$res = [];

$sql = "SELECT * FROM `goods_list`";
$gettab = mysqli_query($con, $sql);
$list = [];
while ($arr = mysqli_fetch_array($gettab)) {
  array_push($list, $arr);
}
if ($list) {
  $res["status"] = true;
  $res["mag"] = "数据请求成功";
  $res["data"] = $list;
} else {
  $res["status"] = false;
  $res["mag"] = "数据错误";
}
echo (json_encode($res, JSON_UNESCAPED_UNICODE));
